package com.chujian.system.sys.service;

import com.chujian.framework.core.base.BaseService;
import com.chujian.sys.entity.SysUserLogin;
import com.chujian.wx.entity.WxMinipUser;
import com.chujian.wx.vo.GetPhoneInfoVo;

/**
 * 服务类
 *
 * @author chujian
 * @since 2021-10-11
 */
public interface SysUserLoginService extends BaseService<SysUserLogin> {

    SysUserLogin saveSysUserLogin(WxMinipUser wxMinipUser);

    SysUserLogin getByOpenId(String openId);

    /**
     * 绑定微信和系统用户
     *
     * @param userId
     */
    void bindSysWxUser(Long userId, Long userLoginId);

    SysUserLogin parseMaUserPhone(String appId, GetPhoneInfoVo getPhoneInfoVo);

    SysUserLogin saveRealName(String appId, SysUserLogin userLogin);

    /**
     * 获取用户对应的小程序账号
     *
     * @param userId
     * @return
     */
    SysUserLogin getMaUserLoginByUserId(Long userId);

}
